/*
 * SplashState.cpp
 *
 *  Created on: 28/07/2010
 *      Author: alex
 */

#include "control/InputManager.h"
#include "core/utils.h"
#include "SplashState.h"

using namespace utils;


SplashState::SplashState() :
background("img/backgrounds/splashbg.jpg") {
	rectCenter = new SDL_Rect(makeRect(VIDEO_WIDTH/2, VIDEO_HEIGHT/2, 0, 0));
	background.setX(VIDEO_WIDTH/2).setY(VIDEO_HEIGHT/2);
}


SplashState& SplashState::update(unsigned  dt) {
	if (inputManager.isKeyPress(SDLK_RETURN, playerNumber)) {
		finished = true;
		next = STATE_ARENA;
	}
	return *this;
}


void SplashState::render(SDL_Surface* screen) {
	background.render(screen);
	//character1.render(screen);
	//character2.render(screen);
	//character3.render(screen);
	//rectangle.render(screen);
	//chooseText.render(screen);
}
